<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			body {
				height: 1000px;
			}

			div {
				position: sticky;
				top: 0px;
				width: 200px;
				height: 20px;
				background-color: orange;
				margin: 100px auto;
			}
		</style>
	</head>
	<body>
		<div>我是粘性定位</div>
	</body>
</html>
